Skip to content

Task/tcdizm 364/fix config fields in data filter#136

Merged
timothygachengo merged 7 commits into
mainfrom
task/TCDIZM-364/fix-config-fields-in-data-filter
May 14, 2026
Merged

Task/tcdizm 364/fix config fields in data filter#136
timothygachengo merged 7 commits into
mainfrom
task/TCDIZM-364/fix-config-fields-in-data-filter

Conversation

@timothygachengo

@timothygachengo timothygachengo commented May 12, 2026

Copy link
Copy Markdown
Contributor

Description

  • Fix data-filter not loading some configuration fields
  • Added CI to check pnpm build when a PR is opened.

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Breaking change (BREAKING CHANGE:)
  • Refactor / chore (refactor: / chore:)
  • Documentation update (docs:)

Affected package(s)

  • @devgateway/dvz-wp-commons
  • @devgateway/create-wp-customizer
  • @devgateway/upgrade-wp-customizer
  • plugins/wp-react-blocks-plugin
  • plugins/wp-react-custom-api
  • plugins/wp-react-custom-rest-menu
  • Other plugin / theme / Docker (no changeset needed)

Checklist

  • PR title follows Conventional Commits format
  • A changeset has been added (pnpm changeset) for any change to a published package
  • pnpm build passes locally
  • No hardcoded credentials, internal URLs, client names, or PII introduced
  • Any new dependency has a GPL-2.0-or-later-compatible license (MIT, BSD, Apache-2.0, ISC are all compatible)

- Display "Select Filter" section immediately when app is selected instead of waiting for filters to load
- Add loading state ("Loading filter options...") while API metadata is being fetched
- Add null/undefined checks for this.state.filters to prevent errors during loading
- Apply fixes to both non-API and CSV filter sections
- Guard DataFilters component rendering with filters existence check

This fixes the issue where Zambia blocks had no filter configuration options visible on initial load, making the filter appear useless until the user changed the app. Ethiopia worked because it had a default app pre-configured.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the filter block editor UI so configuration fields render even while filter metadata is still loading, and adds a GitHub Actions workflow intended to run pnpm run build on pull requests.

Changes:

  • Render the “Select Filter” panel for non-CSV apps even when filter options haven’t loaded yet (shows a loading state).
  • Tighten some equality checks and guard DataFilters rendering until filter metadata is available.
  • Add a PR workflow to run pnpm run build.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
plugins/wp-react-blocks-plugin/blocks/filter/BlockEdit.js Adjusts editor-side conditional rendering/loading behavior for filter configuration panels.
.github/workflows/test-on-pr.yml Adds a pull-request CI workflow to run the monorepo build.

Comment thread plugins/wp-react-blocks-plugin/blocks/filter/BlockEdit.js Outdated
Comment thread .github/workflows/test-on-pr.yml
Comment thread .github/workflows/test-on-pr.yml Outdated
timothygachengo and others added 4 commits May 12, 2026 15:44
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…thub.com:devgateway/data-viz-wordpress into task/TCDIZM-364/fix-config-fields-in-data-filter
@timothygachengo timothygachengo merged commit fe55779 into main May 14, 2026
1 check passed
@timothygachengo timothygachengo deleted the task/TCDIZM-364/fix-config-fields-in-data-filter branch May 14, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants